Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[uss_qualifier/scenarios/netrid/nominal_behavior] Add checks for UA classification in SP (NET0260) #870

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mickmis
Copy link
Contributor

@mickmis mickmis commented Dec 17, 2024

This adds the checks for UA classification and UA classification type exposed by SP (requirements NET0260,Table1,3 and NET0260,Table1,4).

@mickmis mickmis force-pushed the uaclassification/sp branch from f82aa54 to a8af531 Compare December 19, 2024 16:15
Copy link
Contributor

@Shastick Shastick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Logic looks good overall, but one of the check sub-functions does not seem to be invoked.

@@ -651,3 +673,209 @@ def _evaluate_operational_status(
key="skip_reason",
message=f"Unsupported version {self._rid_version}: skipping Operational Status evaluation",
)

def _evaluate_ua_type(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The call to this function is missing (presumably in evaluate_sp_details)

query_timestamps=[query_timestamp],
)

equivalent = {injection.UAType.HybridLift, injection.UAType.VTOL}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A little comment explaining this might help us in the future

Comment on lines +729 to +736
try:
injection.UAType(observed_val)
except ValueError:
check.record_failed(
"UA type is invalid",
details=f"USS returned an invalid UA type: {observed_val}.",
query_timestamps=[query_timestamp],
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we actually reach this code if observed_val is invalid? I would assume that if it is invalid, it was different than injected_val?

Or do we expect injected_val to take invalid values?

Comment on lines +811 to +822
injected_eu_category = injected_eu_classification.get("category")
injected_eu_class = injected_eu_classification.get("class")
observed_eu_category = (
observed_eu_classification.get("category")
if observed_eu_classification
else None
)
observed_eu_class = (
observed_eu_classification.get("class")
if observed_eu_classification
else None
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given that we compare the classification dicts earlier (with injected_classification_fields != observed_classification_fields:), would we not fail at an earlier stage? (Although, I see that the severity level is of 'warning', so the additional details may be welcome)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants